Skip to content

Conversation

bavshin-f5
Copy link
Member

Simplify "challenge" directive parsing.

Inspired by Certbot's --preferred-challenges.

Copy link
Contributor

@xeioex xeioex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@bavshin-f5 bavshin-f5 requested a review from Copilot October 8, 2025 00:43
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR simplifies the "challenge" directive parsing by allowing unversioned challenge names alongside the existing versioned ones. This change is inspired by Certbot's --preferred-challenges approach and makes the configuration more user-friendly.

  • Allow both versioned (http-01, tls-alpn-01) and unversioned (http, tls-alpn) challenge names
  • Replace the generic From<&str> implementation with explicit pattern matching for better validation
  • Update documentation to reflect the new unversioned options

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/conf.rs Replaces generic string conversion with explicit pattern matching for challenge validation
src/acme/types.rs Removes the From<&str> implementation for ChallengeKind
t/acme_conf_issuer.t Adds test for unversioned challenge name and error handling
README.md Documents the new unversioned challenge name options

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Simplify "challenge" directive parsing.
@bavshin-f5 bavshin-f5 merged commit 17bf911 into nginx:main Oct 8, 2025
15 checks passed
@bavshin-f5 bavshin-f5 deleted the challenge-names branch October 8, 2025 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants